package com.springboot.caiji.controller;


import com.springboot.caiji.entity.view.TrestInfoView;
import com.springboot.caiji.service.ITRestinfoService;
import com.springboot.caiji.util.ResultView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-06-27
 */
@RestController
@RequestMapping("/v1/scada")
public class TRestinfoController {


    @Autowired
    private ITRestinfoService itRestinfoService;


    /**
     * 根据ID获取当前数据
     * @return
     */
    @GetMapping("/getallrealdata")
    public ResultView getallrealdata() {
        List<TrestInfoView> trestInfoViewList=this.itRestinfoService.getAll();
        return ResultView.ok(trestInfoViewList);
    }


}
